${grid.elementId}_grid = $("#${grid.elementId}");
var divheight = window.screen.availHeight - 400;
${grid.elementId}_grid.jqGrid({
		url:'${grid.dataPath}',
  		datatype: 'json', 
      	//colNames: [${grid.columnNames}],
      	width:750,
		height:'auto',
      	colModel:[
		#{list grid.columns,as:'col'}
			{
			name:'${col.name}',
			index:'${col.index}',
			width:'${col.width}',
			align:'center',
			sortable:${col.sortable},
			search:true
			}
			${col_isLast ?'':',' }
		#{/list}
		],
      	rowNum : ${grid.pageSize},
		rowList:${grid.rowList}, 
		pager: '#${grid.pagerId}', 
		sortname: '', 
		sortorder:'',
      	viewrecords: true, 
        gridview: true,
		caption:'${grid.title}',
		height: "700px",
		prmNames : {
            page: 'grid.page',       
            sort: 'grid.sortName',  
            order: 'grid.sortOrder',
			rows:'grid.pageSize'
    	}
	});
function search(params,elementId){
	var postData = jQuery('#' + elementId).jqGrid("getGridParam", "postData");  
	$.extend(postData,params); 
	jQuery('#' + elementId).jqGrid("setGridParam",{ 
	        search: true
	}).trigger("reloadGrid",[{page:1}]); 
}